from tools.environment import *
from .genshin import Genshin


class Rambler(Genshin):
    def genshin_rambler(self):
        self.tp_fontaine1()
        self.home()
        self.open_sub("背包")
        wait(1500)
        self.check_overdue()
        click(1053, 48)
        wait(800)
        x, y = find_pic(r"assets\genshin\picture\lit_tools\rambler.png",
                        (109, 113, 1275, 459))[0]
        click(x, y)
        wait(800)
        click(1694, 1022)
        wait(800)
        press("esc")
        wait(1000)
        press("F")
        wait(3000)
        self.world()
        self.indicate("到达尘歌壶：璃月主建筑")

        keydown("S")
        wait(200)
        keyup("S")
        wait(500)
        keydown("D")
        wait(400)
        keyup("D")
        self.indicate("到达阿圆")
        press("F")
        wait(2000)
        click(1300, 431)
        wait(2000)
        click(1300, 431)
        wait(2000)
        click(1076, 950)
        wait(800)
        click(1815, 899)
        wait(800)
        click(1805, 704)
        wait(800)
        click(1815, 899)
        wait(800)
        click(1874, 48)
        wait(4000)
        click(1362, 800)
        wait(1000)
        click(1362, 800)
        self.home()
